<template>
	<view>
		<!-- <view class="coupon-item" :class="!status?'h':''"> -->
		<view class="coupon-item">
			<view class="coupon-item-header">
				<view class="coupon-item-info">
					<view class="coupon-item-money">{{preferential}}</view>
				</view>
				<view class="coupon-item-right">
					<view class="num">
						{{number}}
					</view>
					<span>答题数量</span>
				</view>
			</view>
			<view class="coupon-item-content">
				<view class="coupon-left-top">
					<view class="coupon-item-name">
					<uni-badge class="uni-badge-left-margin" text="0" :is-dot="true" size="small" :type="status ? 'success':'info'" />
					{{status ? "已发布":"未发布"}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "lx-coupon",
		props: {
			status: {
				type: Boolean,
				default: true
			},
			preferential: {
				type: String,
				default: ""
			},
			content: {
				type: String,
				default: ""
			},
			time: {
				type: String,
				default: '2023-06-12 12:00:00'
			},
			cardId:{
				type: Number,
				default: 0
			},
			number:{
				type: Number,
				default:0
			}
		},
		methods:{
			userEvent(id,num){
				this.$emit('dianji',id,num);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.coupon-item-name{
		font-size: 32rpx;
	}
	.coupon-item {
		background: #fff;
		padding: 30rpx;
		border-radius: 20rpx;
		margin-top: 30rpx;
		margin-left: 30rpx;
		margin-right: 30rpx;
		&.h {
			filter: grayscale(100%);
		}
		
		.coupon-item-header{
			top: 0;
			display: flex;
			align-items: center;
			// margin-bottom: 10px;
			.coupon-item-info{
				width: 100%;
				font-weight: bold;
			}
			.coupon-item-right{
				width: 150rpx;
				text-align: center;
			}
			
		}
		.coupon-item-content{
			color: #6a7078;
		}
		.coupon-item-bottom{
			display: flex;
			align-items: center;
			justify-content: space-around;
			color: #a2a9b6;
			.coupon-item-num{
				color: #000000;
			}
		}
		.num{
			font-size: 45rpx;
			color: #80b156;
		}
		span{
			font-size: 25rpx;
			color: #b3b3b3;
		}
	}
</style>